Adjust planar_filter_step to better handle parallel edges#232
Conversation
- Rename CMake presets: "test-build" -> "test", "python-build" -> "python" - Add unit test for stacked parallel cloth layers and helper maker - Relax assert beta to allow zero root in TrustRegion - Skip edge-edge planar filter for nearly-parallel edges with negligible approach velocity to avoid spurious truncation
There was a problem hiding this comment.
Pull request overview
This PR adjusts OGC Planar-DAT’s planar_filter_step to avoid spurious displacement truncation for edge-edge candidates when edges are nearly parallel and have negligible approach velocity, and adds a regression test intended to cover stacked parallel cloth layers.
Changes:
- Add an early-exit in
TrustRegion::planar_filter_step()to skip planar filtering for nearly-parallel edge-edge candidates with near-zero approach velocity. - Add
Candidates::is_*()helpers to identify candidate types by flattened index. - Add a new OGC trust region test scenario and rename CMake build preset names.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/ipc/ogc/trust_region.cpp |
Adds edge-edge near-parallel / negligible-approach skip logic to reduce spurious planar truncation. |
src/ipc/candidates/candidates.hpp |
Declares candidate-type query helpers (is_vertex_vertex, is_edge_vertex, etc.). |
src/ipc/candidates/candidates.cpp |
Implements candidate-type query helpers based on the existing flattened indexing order. |
tests/src/tests/ogc/test_trust_region.cpp |
Adds a cloth-layer regression test targeting planar filtering behavior with parallel edges. |
CMakePresets.json |
Renames build preset names (test-build→test, python-build→python). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (46.66%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
==========================================
- Coverage 95.84% 95.75% -0.10%
==========================================
Files 160 160
Lines 16589 16619 +30
Branches 919 919
==========================================
+ Hits 15900 15913 +13
- Misses 689 706 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
Skip edge-edge planar filter for nearly-parallel edges with negligible approach velocity to avoid spurious truncation.
Type of change